#ifndef _FONT_H_
#define _FONT_H_

typedef struct {
	unsigned v:2;
	unsigned antal:6;
} __attribute__ ((__packed__)) RLEchar12;

typedef struct {
	unsigned v:3;
	unsigned antal:5;
} __attribute__ ((__packed__)) RLEchar28;

class Font {
	SDL_Surface* helFont;
	int hel_height;
	unsigned const char* sizes;
	unsigned char kerning[105][105];
	template < typename RLEchar >
	void uncompressKerning( const RLEchar kerningk[], int len );
public:
	SDL_Surface* renderText( const char* text, SDL_Color farg );
	
	Font( int fontsize );
	~Font();
};

#endif
